package net.qiqb.usr.customer.infrastructure;

import lombok.AllArgsConstructor;
import net.qiqb.usr.custom.client.types.CustomerId;
import net.qiqb.usr.customer.application.DisableCustomCmd;
import net.qiqbframework.commandhandling.gateway.CommandGateway;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

@AllArgsConstructor
@Service
public class TestService {

    private final CommandGateway commandGateway;

    @Async
    public void test(CustomerId id){
        // 同时修改命令
        DisableCustomCmd cmd = new DisableCustomCmd(id);
        commandGateway.send(cmd);
    }

}
